/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package burbujanumers;

import java.util.Arrays;

/**
 *
 * @author rcerrato
 */
public class BurbujaNumers {
/**hgk/
    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        int lista[]={ 9, 2 ,7 , 4, 3, -9, 0};
        Arrays.sort(lista);
    
        
        for(int i=0; i<lista.length;i++)
        {
            System.out.print("\t"+ lista[i]);
            
        }
        
        
        
        System.out.println();
        int otraLista[]={9,8,5,1};
    burbuja(otraLista);
            for(int i=0; i<otraLista.length;i++)
        {
            System.out.print("\t"+ otraLista[i]);
        }
    }
    commit;
    public static void burbuja(int v[])
    {
    int j, k, aux;
    for(j=1;  j<v.length; j++)
	for (k=0;  k<v.length-1; k++)
		if (v[k]>v[k+1])
			{
                            aux=v[k];
                            v[k]=v[k+1];
                            v[k+1]=aux;
                        }
    }
   

}
